
public class clock {
    private int value = 0;//时间变动量
    private int limit = 0;      //普通成员变量,限制上限到：60；或24
    private static int step;    //类变量，广属于类而不专属于任何一个对象

    public clock (int limit){
        this.limit = limit;
    }

    public void increase(){
        value++;
        if(value == limit){
            value = 0;
        }
    }

    public int getValue(){
        return  value;
    }

}

